package com.franklin.ideaplugin.api.ui.panel;

import com.franklin.ideaplugin.api.ui.IBaseComponent;
import com.franklin.ideaplugin.api.utils.SwingUtils;

import javax.swing.*;
import java.awt.*;

/**
 * @author Ye Junhui
 * @since 2023/7/26
 */
public class ScrollForm implements IBaseComponent {
    private JPanel mainPanel;
    private JPanel realPanel;
    private JScrollPane scrollPane;

    public void addContent(JComponent content, Dimension size){
        realPanel.setLayout(SwingUtils.createLayoutManager(1,1));
        this.addCell(realPanel,content,0,0,size);
    }

    @Override
    public JComponent getMainPanel() {
        return this.mainPanel;
    }
}
